package com.uzai.console.web.tb.tbuserinfo;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.console.dto.TbUserInfo.TbUserInfoQuery;
import com.uzai.console.dto.TbUserInfo.TbUserInfoUpdateDto;
import com.uzai.console.dto.tb.tbtoken.TbTokenQuery;
import com.uzai.console.service.tb.tbtoken.TbTokenService;
import com.uzai.console.service.tb.tbuserinfo.TbUserInfoService;
import com.uzai.console.vo.tb.tbactivityregtoken.TbActivityRegTokenVo;
import com.uzai.console.vo.tbuserinfo.TbUserInfoVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 淘宝会员信息
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "淘宝会员渠道信息",tags = "淘宝|淘宝会员渠道信息")
@ApiSort(9)
@RestController
public class TbUserInfoController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(TbUserInfoController.class);

    @Autowired
    private TbUserInfoService tbUserInfoService;

    @ApiOperation(value = "分页查询淘宝会员渠道信息列表", notes = "分页查询淘宝会员渠道信息列表", response = TbUserInfoVo.class)
    @ApiOperationSupport(order = 1)
    @PostMapping("/tbUserInfo/findByPage")
    public Object findTbUserInfoByPage(@RequestBody TbUserInfoQuery tbUserInfoQuery){
        return tbUserInfoService.findTbUserInfoList(tbUserInfoQuery);
    }

    @ApiOperation(value = "修改淘宝会员渠道信息", notes = "修改淘宝会员渠道信息", response = Boolean.class)
    @ApiOperationSupport(order = 2)
    @PostMapping("/tbUserInfo/updateTbUserInfo")
    public Object updateTbUserInfo(@RequestBody TbUserInfoUpdateDto tbUserInfoUpdateDto){
        tbUserInfoService.updateTbUserInfo(tbUserInfoUpdateDto);
        return true;
    }

}
